package com.runner.track;

import com.badlogic.gdx.math.Vector2;
import com.runner.entity.CollisionEntity;

public class Cloud extends CollisionEntity {

	private float speed;

	public Cloud(Vector2 pos, String path, float scale, float speed) {
		super(pos, TYPE.CLOUD, path, false, true, false, scale);
		this.speed=speed;
	}

	@Override
	public void update(float delta) {
		physics.getBody().setLinearVelocity(-speed * RELATIVE_SPEED * delta, 0);
		if(physics.getBody().getPosition().x < -CLOUD_WIDTH){
			delete();
		}
	}

	@Override
	public void collide(CollisionEntity otherBody) {
		// TODO Auto-generated method stub

	}

}
